package com.origin.app.page.map.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.origin.app.R
import com.origin.app.bean.CompanyBean
import com.origin.app.bean.CompanyPointBean
import com.origin.app.databinding.ItemCompanyBinding
import com.origin.app.databinding.ItemNavBinding
import com.origin.uilibrary.xrecycleview.adapter.BaseRecycleAdapter
import com.origin.uilibrary.xrecycleview.viewholder.BaseViewHolder

class NavAdapter(list: MutableList<CompanyPointBean>, context: Context) :
    BaseRecycleAdapter<CompanyPointBean>(list, context) {
    override fun setItemData(holder: BaseViewHolder, item: CompanyPointBean, position: Int) {
        val itemNavBinding = holder.binding as ItemNavBinding
        itemNavBinding.companyPointBean = item;
    }

    override fun getViewResource(
        inflater: LayoutInflater,
        viewType: Int,
        parent: ViewGroup
    ): BaseViewHolder {
        return loadDataBindingBaseViewHolder<ItemNavBinding>(
            inflater,
            parent,
            R.layout.item_nav
        )
    }
}